BIOM Import and Export {KbaseKit} | R Documentation |
Easy import and export of objects in the JSON-based Biological Observation Matrix (BIOM) format. Imports lightly encapsulate the BIOM object's numerical data and metadata. Exports write a valid BIOM object.
fromBIOM(file, keepSparse = TRUE) toBIOM(obj, type, ID = NULL, comment = "", asSparse = TRUE, toFile = NULL)
obj |
|
type |
Character: one of |
ID |
Optional, character |
comment |
Optional, character |
asSparse |
Logical: whether to create a |
toFile |
Destination file |
file |
Character: JSON content, name of source file, or URL |
keepSparse |
Logical: if |
The object created by fromBIOM
is of class kb
, which encapsulates metadata but can be used as a matrix
(or sparseMatrix
, as the case may be).
toBIOM
writes a correct BIOM object and returns the filename, or if toFile
is NULL
, returns the object itself as text.
Daniel Braithwaite